<?php
namespace ITSociaal\Themes\Lumber\Hooks;

use ITSociaal\Themes\Lumber\ToProtocolRelativeTrait;

/**
 * Filters URLs to protocol relative URLs
 */
class RelativeUrls implements HooksInterface {

	use ToProtocolRelativeTrait;

	/**
	 * feed_link filter handler
	 *
	 * @param string $output
	 *
	 * @return string
	 */
	public function filterFeedLink($output) {
		return $this->toProtocolRelative($output);
	}

	/**
	 * get_site_icon_url filter handler
	 *
	 * @param string $url
	 *
	 * @return string
	 */
	public function filterGetSiteIconUrl($url) {
		return $this->toProtocolRelative($url);
	}

	/**
	 * post_link filter handler
	 *
	 * @param string $permalink
	 *
	 * @return string
	 */
	public function filterPostLink($permalink) {
		return $this->toProtocolRelative($permalink);
	}

	/**
	 * site_url filter handler
	 *
	 * @param string $url
	 *
	 * @return string
	 */
	public function filterSiteUrl($url) {
		return $this->toProtocolRelative($url);
	}

}

/* vi:set ts=4 sw=4 noet: */
